<div id="news">
<h4> Liên Hệ </h4>
</div>
<?php
	$sql="SELECT * FROM lienhe ORDER BY datepost DESC";
	$spql=$dp->QueryAll($sql);
?>
<table width="100%"  border="1" cellspacing="5" cellpadding="5">
	<tr>
		<td width="20" align="center" valign="middle"><strong>STT</strong></td>
		<td  width="150" align="center" ><strong>Tên NGuoi gui</strong></td>
		
		<td width="100" align="center" valign="middle"><strong>email</strong></td>
		<td width="150" align="center" valign="middle"><strong> Số Đt</strong></td>
		<td align="center" valign="middle"><strong> nội dung </strong></td>
		<td width="50" align="center" valign="middle"><strong>Xóa</strong></td>

	</tr>
	<?php 
		for($i=0;$i<count($spql);$i++)
		{
			$id=$spql[$i]['id'];
			$name=$spql[$i]['name'];
			$email=$spql[$i]['email'];
			$sdt=$spql[$i]['sdt'];
			$noidung=$spql[$i]['noidung'];
			$datepost=$spql[$i]['datepost'];
		    $delete="<img src='IMAGES/xoa.png' />";
			
	?>
	<tr>
		<td width="20" align="center" valign="middle"><?php echo ($i+1); ?></td>
	     <td ><?php echo $name; ?></td>
		<td align="center"><?php echo $email;?></td>
		<td align="center"><?php echo $sdt;?></td>
		<td align="center"><?php echo $noidung;?></td>
		<td align="center">
			<a href="index.php?option=lienhe&cat=delete&id=<?php echo $id?>">
			<?php echo $delete;?>
			</a>
		</td>
	
	
	</tr>
	<?php
		}
	?>
</table>